import service from '@/utils/request'

export const useIotTypeApi = (id: number) => {
	return service.get('/ss/type/' + id)
}

export const userLabelAPi = () => {
	return service.get('/ss/type/label')
}

export const useIotTypeSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/ss/type', dataForm)
	} else {
		return service.post('/ss/type', dataForm)
	}
}